<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <if condition="$isMy eq true">
        <title>
            <if condition="$myUserData['zonename'] eq null">
                我的空间
                <else/>
                {$myUserData['zonename']}
            </if>
        </title>
        <else/>
        <title>
            <if condition="$userData['zonename'] eq null">
                {$userData['username']}的空间
                <else/>
                {$userData['zonename']}
            </if>
        </title>
    </if>
    <!-- Bootstrap -->
    <link href="__PUBLIC__/css/style.css" rel="stylesheet">
    <link href="__PUBLIC__/css/style-responsive.css" rel="stylesheet">
    <link rel="stylesheet" href="__PUBLIC__/css/viewer.css" type="text/css">

    <block name="scriptSrc"></block>
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="__PUBLIC__/js/html5shiv.js"></script>
    <script src="__PUBLIC__/js/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" href="__PUBLIC__/css/my.css">
</head>
<body style="padding-top: 80px">
<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <a class="navbar-brand">
            </a>
        </div>


        <div class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
                <li><a href="{:U('Index/infocent',array('user_id'=>$myUserData['id']))}">个人中心</a></li>
                <li><a href="{:U('Index/index',array('user_id'=>$myUserData['id']))}">我的主页</a></li>
                <li><a href="{:U('Friends/index')}">好友</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li><a href="#">最近登录时间: <?php echo date('Y年m月d日 H:i:s') ?></a></li>
                <li><a href="#">用户: {$myUserData['username']}</a></li>
                <li><a href={:U('User/loginOut')}>退出</a></li>
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>
<div class="row">
    <div class="row col-md-4">
        <div class="profile-pic text-center col-md-7">
            <img class="zoendp" src="__PUBLIC__{$userData['zonedp']}" alt="">
        </div>
        <span style="font-size: 40px; margin-top: 78px; display: inline-block;">
            <if condition="$isMy eq true">
            <if condition="$myUserData['zonename'] eq null">
                我的空间
                <else/>
                {$myUserData['zonename']}
            </if>
        <else/>
            <if condition="$userData['zonename'] eq null">
                {$userData['username']}的空间
                <else/>
                {$userData['zonename']}
            </if>
    </if>
        </span>
        <?php if($isMy):?>
        <div class="upload col-md-6">
            <input type="file" id="zonedp" value="选择图片" multiple="multiple" name="zonedp">
        </div>
        <?php endif;?>
    </div>

    <div class="row col-md-8">
        <!--<img src= "<?php echo $_SESSION['qzone']['zonedp']==''?'__PUBLIC__/images/default.jpg':$_SESSION['qzone']['zonedp']; ?>"  class="col-md-1 col-md-offset-1 tx">-->


        <a href="{:U('Index/index',array('user_id'=>$userData['id']))}"
           class="col-md-1"><label>主页</label></a>

        <a href="{:U('Log/index',array('user_id'=>$userData['id']))}" class="col-md-1"><label>日志</label></a>

        <a href="{:U('Xiangce/index',array('user_id'=>$userData['id']))}"
           class="col-md-1"><label>相册</label></a>

        <a href="{:U('Liuyanban/index',array('user_id'=>$userData['id']))}"
           class="col-md-1"><label>留言板</label></a>

        <a href="{:U('Say/index',array('user_id'=>$userData['id']))}" class="col-md-1"><label>说说</label></a>

        <a href="{:U('Gerendang/gerendang',array('user_id'=>$userData['id']))}"
           class="col-md-1"><label>个人档</label></a>
    </div>
</div>
<block name="main">
</block>
<!-- 此处引入jQuery -->
<script src="__PUBLIC__/js/jquery.min.js"></script>
<!-- bootstrap.min.js必须放在JQ后面 -->
<script src="__PUBLIC__/js/jquery-1.10.2.min.js"></script>
<script src="__PUBLIC__/js/jquery-ui-1.9.2.custom.min.js"></script>
<script src="__PUBLIC__/js/jquery-migrate-1.2.1.min.js"></script>
<script src="__PUBLIC__/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/js/modernizr.min.js"></script>
<script src="__PUBLIC__/js/jquery.nicescroll.js"></script>
<script src="__PUBLIC__/js/jquery.isotope.js"></script>
<!--Sparkline Chart-->
<script src="__PUBLIC__/js/sparkline/jquery.sparkline.js"></script>
<script src="__PUBLIC__/js/sparkline/sparkline-init.js"></script>
<!--common scripts for all pages-->
<script src="__PUBLIC__/js/scripts.js"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/uploadify.css">
<script src="__PUBLIC__/js/viewer.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/main.js" type="text/javascript"></script>
<script type="text/javascript">
    $("#zonedp").on('change',function(){
        var formData = new FormData();
        $.each($('#zonedp')[0].files, function(i, file) {
            formData.append('upload_file[]', file);
        });

        $.ajax({
            url: '{:U("Update/dpUpload")}',
            type: 'POST',
            cache: false,
            data: formData,
            dataType: "json",
            processData: false,
            contentType: false,
            success: function(data){
                if(data.status == '0')
                {
                    $('.zoendp').attr('src','__PUBLIC__'+data.path)
                }
                alert(data.message);
            }
        });

    });
</script>
<block name="script"></block>
</body>
</html>